package com.candy.candyuser.model.controller;

import com.candy.candymessagerpc.bean.Message;
import com.candy.candymessagerpc.service.MessageService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author suYanLong
 * @version 1.0
 * @date 2023/12/11 14:58
 * @Description 描述
 */
@RestController
@RequestMapping("test")
@Slf4j
@AllArgsConstructor
public class TestController {

    private final MessageService messageService;

    @GetMapping("test")
    public String test() {
        Message message = new Message();
        message.setType("msg");
        message.setMsg("======");
        messageService.send(message);
        return "true";
    }

}
